home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagd_f.zip
/
FAQ.SWG
/
0021_Reading Array from REGS.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-11-02
|
1KB
|
53 lines
{
MARK OUELLET
> How can I read what appears to be an Array from the Registers value
> (this is after making the interrupt call, and is returned With
> information... I'll be durned if I know how to use it):
> values upon return
> AX = clear on successful (or whatever ... not important)
> ES:DX = see table 2.1
>
> table 2.1
> offset - info (size)
> -----------------------------
> 00h - blah blah (4 Bytes)
> 03h - blah blah (16 Bytes)
> etc ....
>
> And the ES:DX usually points to what appears to be a Record, or a buffer
> of data using an offset to identify what's what. How can I use and/or
> access this info?
}
Type
TablePtr = ^Table
Table = Record
BlahBlah1 : LongInt; { 4Bytes }
BlahBlah2 : Array[1..16] of Byte;
.
.
etc....
end;
{
if using Intr() or MSDos() and the Registers structure defined in
Dos.tpu then:
}
Var
Regs : Registers; {Defined in Dos.tpu}
MyTable : TablePtr;
begin
Regs.AX := ??;
Regs.BX := ??;
Intr(Regs);
TablePtr := Ptr(Regs.ES, Regs.DX);
Write(TablePtr^.BlahBlah1);
.
.
etc...